<script setup>
let students=[{name:'张三',sn:'24130417'},
  {name:'小郑',sn:'2413041738'},
  {name:'小董',sn:'2413041716'},
  {name:'小曹',sn:'2413041717'},
  {name:'小孙',sn:'2413041738'}]
</script><template>  <div>
  <table>
    <tr>
      <td>序号</td>
      <td>姓名</td>
      <td>学号</td>
    </tr>
    <tr v-for="(item,index) in students">
      <td>{{index+1}}</td>
      <td>{{item.name}}</td>
      <td>{{item.sn}}</td>
    </tr>
  </table>
</div>
</template
><style scoped>
table,th,td{border:1px solid black;}
</style>
